#include <iostream>
#include <stdio.h>
#include <unistd.h>

using namespace std;


int main()
{
  char buff[101] = {0};
  const char* flag = "/-\\|";
  for(int i = 0;i < 100;++i)
  {


    printf("[%-99s][%d%%][%c]\r",buff,i + 1,*(flag + i % 4));
    buff[i] = '#';
    fflush(stdout);
    usleep(10000);
  }
  printf("\n");

  return 0;
}

